﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Antlers
{
	public partial class NewKeywordDialog : Form
	{
		private String m_inputValue;

		public NewKeywordDialog()
		{
			InitializeComponent();
		}

		internal String InputValue
		{
			get { return m_inputValue; }

		}

		private void Handler_Ok(object sender, EventArgs args)
		{
			m_inputValue = ui_newKeywordInput.Text;
			DialogResult = DialogResult.OK;
			Close();
		}

		private void Handler_Cancel(object sender, EventArgs args)
		{
			DialogResult = DialogResult.Cancel;
			Close();
		}

		private void Handler_KeyPress(object sender, KeyPressEventArgs args)
		{
			if (args.KeyChar == (char)Keys.Return)
			{
				Handler_Ok(sender, args);
				args.Handled = true;
			}
		}
	}
}
